package com.ssm.exception;

import java.io.PrintStream;
import java.util.Date;

import org.apache.log4j.Logger;


/**
 * SSM 系统级异常
 * @author WWT<245108903@qq.com>
 * @version 2016/1/29
 * 
 * */
public class WebException extends RuntimeException {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Throwable cause=null;
	private String message;
	
	protected final  Logger logger = Logger.getLogger(this.getClass());
	
	public WebException(String message)
	{
		super(message);
		this.message=message;
		logger.error(message);
	}
	
	public WebException(String message,Throwable cause)
	{
		super(cause);
		this.message=message;
		this.cause=cause;
		logger.error(message, cause);
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return message;
	}
	
}
